@tool
class_name ItemInfo
extends Resource



enum Category {
    UNKNOWN,
    CONSUMABLE,
    EQUIPABLE,
}

enum EquipableSlot {
    UNKNOWN,
    COMMON_SLOT,
    WEAPON_SLOT,
    SKILL_SLOT,
}


## CONSUMABLE: 10001 [br]
## PROP: 20001 [br]
## WEAPON: 30001 [br]
@export var id: int:
    set(value):
        id = value
        _change_resource_name()

@export var name: String:
    set(value):
        name = value
        _change_resource_name()

@export_multiline var description: String
@export var category: Category
@export var icon: Texture2D
@export var max_stack_count: int = 1
@export var can_trade: bool
@export var price: int
@export var equipable_slot: EquipableSlot
@export var packed_scene: PackedScene


func _change_resource_name() -> void:
    resource_name = "%d-%s" % [id, name]
    
